﻿namespace SharpF2.ModelView
{
	using System.ComponentModel;

	/// <summary>
	/// Defines the UndoFileItem type.
	/// </summary>
	public class UndoFileItem : INotifyPropertyChanged
	{
		#region Events

		/// <summary>
		/// Event raised when a property has changed.
		/// </summary>
		public event PropertyChangedEventHandler PropertyChanged;

		#endregion

		#region Constructors

		/// <summary>
		/// Initializes a new instance of the <see cref="UndoFileItem" /> class. 
		/// </summary>
		/// <param name="inputFilePath">Input file path</param>
		/// <param name="outputFilePath">Output file path</param>
		public UndoFileItem(string inputFilePath, string outputFilePath)
		{
			InputFilePath = inputFilePath;
			OutputFilePath = outputFilePath;
		}

		#endregion

		#region Private Attributes

		/// <summary>
		/// Input file path
		/// </summary>
		private string inputFilePath;

		/// <summary>
		/// Output file path
		/// </summary>
		private string outputFilePath;

		#endregion

		#region Public Properties

		/// <summary>
		/// Gets or sets InputFilePath.
		/// </summary>
		public string InputFilePath
		{
			get { return inputFilePath; }

			set
			{
				inputFilePath = value;
				NotifyPropertyChanged("InputFilePath");
			}
		}

		/// <summary>
		/// Gets or sets OutputFilePath.
		/// </summary>
		public string OutputFilePath
		{
			get { return outputFilePath; }

			set
			{
				outputFilePath = value;
				NotifyPropertyChanged("OutputFilePath");
			}
		}

		#endregion

		#region Private Members

		/// <summary>
		/// Raise the event PropertyChanged.
		/// </summary>
		/// <param name="info">The PropertyName.</param>
		private void NotifyPropertyChanged(string info)
		{
			if (PropertyChanged != null)
			{
				PropertyChanged(this, new PropertyChangedEventArgs(info));
			}
		}

		#endregion
	}
}